﻿namespace jQube.Web
{
    using System.Web.UI;

    internal class ClientScriptWrapper : IClientScriptManager
    {
        public ClientScriptWrapper(ClientScriptManager clientScriptManager)
        {
            this.ClientScriptManager = clientScriptManager;
        }

        public ClientScriptManager ClientScriptManager { get; private set; }

        #region Miembros de IClientScriptManager

        string IClientScriptManager.GetPostBackEventReference(PostBackOptions options)
        {
            return this.ClientScriptManager.GetPostBackEventReference(options);
        }

        string IClientScriptManager.GetWebResourceUrl(System.Type type, string resourceName)
        {
            return this.ClientScriptManager.GetWebResourceUrl(type, resourceName);
        }

        void IClientScriptManager.RegisterClientScriptBlock(System.Type type, string key, string script)
        {
            this.ClientScriptManager.RegisterClientScriptBlock(type, key, script);
        }

        void IClientScriptManager.RegisterClientScriptInclude(System.Type type, string key, string url)
        {
            this.ClientScriptManager.RegisterClientScriptInclude(type, key, url);
        }

        void IClientScriptManager.RegisterClientScriptBlock(System.Type type, string key, string script, bool addScriptTags)
        {
            this.ClientScriptManager.RegisterClientScriptBlock(type, key, script, addScriptTags);
        }

        void IClientScriptManager.RegisterStartupScript(System.Type type, string key, string script, bool addScriptTags)
        {
            this.ClientScriptManager.RegisterStartupScript(type, key, script, addScriptTags);
        }

        void IClientScriptManager.RegisterHiddenField(string hiddenFieldName, string hiddenFieldInitialValue)
        {
            this.ClientScriptManager.RegisterHiddenField(hiddenFieldName, hiddenFieldInitialValue);
        }

        #endregion
    }
}
